<template>
    <div>
        <h2>{{title}}</h2>
        <button @click="bindChange">更改</button>
        <p>{{$route.query.msg}}</p>
    </div>
  </template>
  
  <!-- 
     1. 点击确定按钮，获取输入框内容，添加到列表
       
  
  -->
  <script>
    export default {
        data() {
            return {
                title:'生命周期',
            }
        },
        methods: {
          bindChange(){
            this.title = '这是生命周期标题'
          }
        },
        created() {
           console.log('created>>>', this.$route.query.msg);
        },
        mounted() {
          console.log('mounted >>>');
        },
        updated() {
          console.log('updated >>>');
        },
        destroyed() {
          console.log('destoryed >>>');
          
        },
    }
  </script>
  
  <style lang="css" scoped>
  
  </style>